package com.qidian.mes.device.service.impl;

import com.qidian.common.pojo.MESResult;
import com.qidian.mes.device.mapper.TypeMapper;
import com.qidian.mes.device.service.TypeService;
import com.qidian.mes.pojo.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author 刘泽磊
 * @Company 起点编程
 * @Description
 * @Time 2024/10/23 15:34
 */
@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;
    @Override
    public MESResult select(Type type) {
        return MESResult.success(typeMapper.select(type));
    }

    @Override
    public MESResult insert(Type type) {
        return MESResult.success(typeMapper.insert(type));
    }

    @Override
    public MESResult update(Type type) {
        return MESResult.success(typeMapper.update(type));
    }

    @Override
    public MESResult selectById(Long typeId) {
        return MESResult.success(typeMapper.selectById(typeId));
    }

    @Override
    public MESResult delete(Long typeId) {
        return MESResult.success(typeMapper.delete(typeId));
    }
}
